﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DnEcuDiag.Conversion
{
    public abstract class IsoConvertor : Convertor
    {
        protected readonly float[] M2104TempTableAdc;
        protected readonly float[] M2104TempTableRam;

        protected IsoConvertor()
        {
            #region M2104 Temp

            M2104TempTableRam = new[]
                                      {
                                          -33.0f, -32.5f, -31.9f, -31.4f, -30.8f, -30.1f, -29.5f, -28.9f, -28.5f, -27.9f
                                          ,
                                          -27.5f, -27.0f, -26.2f, -25.4f, -24.6f, -23.8f, -23.8f, -23.8f, -22.3f, -21.6f
                                          ,
                                          -20.9f, -20.3f, -19.6f, -18.9f, -18.3f, -17.7f, -17.1f, -16.0f, -15.5f, -14.9f
                                          ,
                                          -13.8f, -13.3f, -12.8f, -11.8f, -11.3f, -10.8f, -10.4f, -09.9f, -09.0f, -08.1f
                                          ,
                                          -07.6f, -07.2f, -06.4f, -06.0f, -05.6f, -04.8f, -04.0f, -03.2f, -02.5f, -01.8f
                                          ,
                                          -01.0f, -0.03f, 0.04f, 01.0f, 01.7f, 02.4f, 03.0f, 03.7f, 04.3f, 05.5f, 06.1f,
                                          06.7f,
                                          07.3f, 07.9f, 08.5f, 09.0f, 09.6f, 10.2f, 10.7f, 11.3f, 11.8f, 12.3f, 13.4f,
                                          13.9f,
                                          14.4f, 15.5f, 16.0f, 16.5f, 17.5f, 18.0f, 18.5f, 19.4f, 19.4f, 20.4f, 21.3f,
                                          21.8f,
                                          22.3f, 23.2f, 23.7f, 24.6f, 25.1f, 25.5f, 26.4f, 26.9f, 27.4f, 28.3f, 28.7f,
                                          29.2f,
                                          30.0f, 30.5f, 30.9f, 31.8f, 32.3f, 33.2f, 33.6f, 34.5f, 34.9f, 35.4f, 36.2f,
                                          36.7f,
                                          37.6f, 38.0f, 38.9f, 39.3f, 39.8f, 40.7f, 41.1f, 42.0f, 42.5f, 43.4f, 43.8f,
                                          44.7f,
                                          42.5f, 45.6f, 46.5f, 47.0f, 47.9f, 48.4f, 49.3f, 49.8f, 50.2f, 51.2f, 51.6f,
                                          52.6f,
                                          53.1f, 53.6f, 54.5f, 55.0f, 55.5f, 56.5f, 57.0f, 57.5f, 58.5f, 59.1f, 59.6f,
                                          60.6f,
                                          61.2f, 61.7f, 62.8f, 63.3f, 63.9f, 65.0f, 65.5f, 66.1f, 67.2f, 67.8f, 68.4f,
                                          69.6f,
                                          70.2f, 70.8f, 71.1f, 71.4f, 72.1f, 72.7f, 73.3f, 74.0f, 74.6f, 75.0f, 75.3f,
                                          76.0f,
                                          76.7f, 77.3f, 78.0f, 78.4f, 78.7f, 79.5f, 80.2f, 80.9f, 81.7f, 82.1f, 82.4f,
                                          83.2f,
                                          84.0f, 84.8f, 85.6f, 86.4f, 86.8f, 87.2f, 88.1f, 88.9f, 89.4f, 89.8f, 90.7f,
                                          91.2f,
                                          91.6f, 92.5f, 93.0f, 93.5f, 94.0f, 94.0f, 94.5f, 95.5f, 96.0f, 96.5f, 97.0f,
                                          97.5f,
                                          98.6f, 99.1f, 99.6f, 100.8f, 101.4f, 101.9f, 102.5f, 103.1f, 104.3f, 104.9f,
                                          105.5f,
                                          106.8f, 107.4f, 108.1f, 108.5f, 109.1f, 109.5f, 110.2f, 110.9f, 110.9f, 110.9f
                                          , 112.3f,
                                          112.3f, 112.3f, 112.3f, 113.8f, 114.5f, 115.0f, 115.0f, 115.0f, 116.9f, 124.0f
                                          , 124.0f,
                                          124.0f, 124.0f, 124.0f, 124.0f, 124.0f, 124.0f, 124.0f, 125.0f, 125.0f, 125.0f
                                          , 125.0f,
                                          125.0f, 125.0f
                                      };

            M2104TempTableAdc = new[]
                                      {
                                          400.0f, 400.0f, 400.0f, 400.0f, 400.0f, 400.0f, 193.7f, 185.3f, 178.1f, 172.0f
                                          , 166.5f, 161.7f, 157.3f, 153.3f, 149.7f, 146.3f,
                                          143.2f, 140.3f, 137.5f, 135.0f, 132.6f, 130.3f, 128.1f, 126.0f, 124.0f, 122.2f
                                          , 120.3f, 118.6f, 116.9f, 115.3f, 113.8f, 112.3f,
                                          110.9f, 109.5f, 108.1f, 106.8f, 105.5f, 104.3f, 103.1f, 101.9f, 100.8f, 99.6f,
                                          98.6f, 97.5f, 96.5f, 95.5f,
                                          94.5f, 93.5f, 92.5f, 91.6f, 90.7f, 89.8f, 88.9f, 88.1f, 87.2f, 86.4f, 85.6f,
                                          84.8f, 84.0f, 83.2f, 82.4f, 81.7f,
                                          80.9f, 80.2f, 79.5f, 78.7f, 78.0f, 77.3f, 76.7f, 76.0f, 75.3f, 74.6f, 74.0f,
                                          73.3f, 72.7f, 72.1f, 71.4f, 70.8f,
                                          70.2f, 69.6f, 69.0f, 68.4f, 67.8f, 67.2f, 66.7f, 66.1f, 65.5f, 65.0f, 64.4f,
                                          63.9f, 63.3f, 62.8f, 62.2f, 61.7f,
                                          61.2f, 60.6f, 60.1f, 59.6f, 59.1f, 58.5f, 58.0f, 57.5f, 57.0f, 56.5f, 56.0f,
                                          55.5f, 55.0f, 54.4f, 54.1f, 53.6f,
                                          53.1f, 52.6f, 52.1f, 51.6f, 51.2f, 50.7f, 50.2f, 49.8f, 49.3f, 48.8f, 48.4f,
                                          47.9f, 47.4f, 47.0f, 46.5f, 46.1f,
                                          45.6f, 45.2f, 44.7f, 44.3f, 43.8f, 43.4f, 42.9f, 42.5f, 42.0f, 41.6f, 41.1f,
                                          40.7f, 40.2f, 39.8f, 39.3f, 38.9f,
                                          38.5f, 38.0f, 37.6f, 37.1f, 36.7f, 36.2f, 35.8f, 35.4f, 34.9f, 34.5f, 34.0f,
                                          33.6f, 33.2f, 32.7f, 32.3f, 31.8f,
                                          31.4f, 30.9f, 30.5f, 30.0f, 29.6f, 29.2f, 28.7f, 28.3f, 27.8f, 27.4f, 26.9f,
                                          26.4f, 26.0f, 25.5f, 25.1f, 24.6f,
                                          24.2f, 23.7f, 23.2f, 22.8f, 22.3f, 21.8f, 21.3f, 20.9f, 20.4f, 19.9f, 19.4f,
                                          18.9f, 18.5f, 18.0f, 17.5f, 17.0f,
                                          16.5f, 16.0f, 15.5f, 15.0f, 14.4f, 13.9f, 13.4f, 12.9f, 12.3f, 11.8f, 11.3f,
                                          10.7f, 10.2f, 09.6f, 09.0f, 08.5f,
                                          07.9f, 07.3f, 06.7f, 06.1f, 05.5f, 04.9f, 04.3f, 03.7f, 03.0f, 02.4f, 01.7f,
                                          01.0f, 00.4f, -0.3f, -1.0f, -1.8f,
                                          -2.5f, -3.2f, -4.0f, -4.8f, -5.6f, -6.4f, -7.2f, -8.1f, -9.0f, -9.9f, -10.8f,
                                          -11.8f, -12.8f, -13.8f, -14.9f,
                                          -16.0f, -17.1f, -18.3f, -19.6f, -20.9f, -22.3f, -23.8f, -25.4f, -27.0f, -28.9f
                                          , -30.8f, -33.0f, -35.4f, - 38.1f,
                                          -41.2f, -44.9f, -49.4f, -55.6f, -65.3f
                                      };

            #endregion
        }
    }
}
